<?php

namespace mbilling\BillingBundle\Model;

use Doctrine\ORM\EntityManager;
use mbilling\BillingBundle\Entity\usersAdminLogs;


Class UsersAdminLogsModel
{
    protected $em;

    public function __construct(EntityManager $em)
    {
        $this->em = $em;
    }

    public function findAll()
    {
        $logs = $this->em->getRepository('BillingBundle:usersAdminLogs')->findAll();
        return $logs;
    }

    public function create($oEntity)
    {
        $this->em->persist($oEntity);
        $this->em->flush();
    }

    public function removeByPK($log_id)
    {
        $log = $this->em->find('BillingBundle:usersAdminLogs', $log_id);
        $this->em->remove($log);
        $this->em->flush();
    } 
}
?>
